<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Nephtali Install</title>
<style type="text/css">
/* normalizes margin, padding */
body,div,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0; padding:0;}
/* normalizes header font-size */
h1,h2,h3,h4,h5,h6{font-size:100%;}
/* normalizes font style and weight */
address,caption,cite,code,dfn,th,var{font-style:normal; font-weight:normal;}
/* removes table borders and spacing */
table{border-collapse:collapse; border-spacing:0;}
/* removes border from fieldset and img */
fieldset,img{border:0;}
/* left-aligns text in caption and th */
caption,th{text-align:left;}

/* general elements */
body{font-size:75%;}
html>body{font-size:12px;}
html,body{font-family:Verdana, Arial, Helvetica, sans-serif; color:#203041; background-color:#203041; line-height:1.5em;}
h1{font-size:1.5em; line-height: 1em; margin-top:1em; margin-bottom:1em;}
h2{font-size:1.333em; /* 16px = 18/16 = 1.125*/ line-height:1.125em; margin-top:1.125em; margin-bottom:1.125em;}
h3{font-size:1.25em; /* 15px = 18/15 = 1.2*/ line-height:1.2em; margin-top:1.2em; margin-bottom:1.2em;}
h4{font-size:1.167em; /* 14px = 18/14 = 1.286 */ line-height:1.286em; margin-top:1.286em; margin-bottom:1.286em;}
h5{font-size:1.083em; /* 13px = 18/13 = 1.385 */ line-height:1.385em; margin-top:1.385em; margin-bottom:1.385em;}
p,dt,dd,label,input,textarea,li, pre{line-height:1.5em; font-size:1em; margin-top:1.5em; margin-bottom:1.5em;}
label{margin-bottom:0;}
input,textarea{margin-top:0;}
a{color:#1f2f40;}
a:visited{color:#1f2f40;}
a:hover{}
pre{font-family:Verdana, Arial, Helvetica, sans-serif; background-color:#ededed; padding:.5em 10px;}
code{}

/* classes */
.postdate, .blurred {color:#999999;}
.reduce{font-size:.85em;}
ul.standard_list{list-style:square;}
ul.standard_list li{margin-left:20px;}

/* ids */
#container{max-width:1000px; min-width:760px; margin:0px auto; position:relative; background-color:#FFFFFF; border:2px solid #121c26; border-top-width:0;}
#site_id{height:72px; background: url(http://nephtaliproject.com/images/template_files/header_background.jpg) bottom repeat-x;}
#site_id h1{text-indent:-9999px; width:156px; height:39px; position:absolute; top:2em; left:20px; background:url(../../images/template_files/logo.gif) no-repeat; margin-top:0;}
#site_id h1 a{display:block; width:100%; height:100%;}
#site_id p{position:absolute; top:0; left:270px; width:503px;}

#site_info{text-align:center; margin:1.5em 20px 1.5em 20px;}

#nav_primary{overflow:hidden; background:#1F2F40 url(../../images/template_files/primary_nav_background.jpg) top repeat-x; margin-top:1.5em;}
#nav_primary li{float:left; margin:0;}
#nav_primary li a{display:block; height:1.5em; padding:.5em 20px; text-decoration:none; color:#FFFFFF; font-weight:bold;}
#nav_primary a:hover{background-color:#121c26;}

#nav_utility{position:absolute; top:4em; right:20px;}
#nav_utility a{color:#1F2F40;}
#nav_utility a:visited{color:#1F2F40;}
#nav_utility form, #nav_utility div{display:inline;}

#content{clear:both; overflow:hidden;}
#content label{display:block;}
#content_primary{float:left; margin:0 20px 1.5em 20px; min-width:90%;}
#content_secondary{width:59%; float:left; margin:1.5em 20px 1.5em 20px;}
#content_tertiary{width:31%; float:right; margin:1.5em 20px 1.5em 20px;}
#content_tertiary .wrapper{border:1px solid #121c26; -moz-border-radius: 4px; -webkit-border-radius: 4px;}
#content_tertiary .wrapper h2{margin-top:0; padding:1.125em 10px 1.125em 10px; color:#ffffff; background-color:#203041;}
#content_tertiary .wrapper p, #content_tertiary .wrapper h3, #content_tertiary .wrapper h4{margin-left:20px; margin-right:20px;}
</style>
</head>
<body class="twoColElsLtHdr">
<div id="container">
<div id="site_id">
<h1><a href="http://nephtaliproject.com">Nephtali</a></h1>
<p><strong>Nephtali:A PHP web framework that functions beautifully</strong></p>
</div>
<div id="content">
<div id="content_primary">
<?php
	// test for PHP 5
	if(!preg_match('/^([5][.][3-9][.][0-9.]+)|([6][0-9.]+)$/', phpversion()))
	{
?>
<h1>You do not meet the minimum requirements</h1>
<p>Nephtali requires PHP version 5.3 or greater.  We hope your server is upgraded soon :(</p>
<?php
	}
	else
	{
?>
<h1>Install Nephtali</h1>
<ol>
<li>
<h2>Upload Nephtali</h2>
<p>Upload the 'nephtali' directory within the downloaded directory to the location listed below:</p>
<p><?php echo dirname(dirname(__FILE__)); ?>/</p>
</li>
<li>
<h2>Configure PHP</h2>
<p>We have to configure PHP to turn on output buffering and append the Nephtali core file to requests.</p>
<p>You can copy and paste the .htaccess configuration info, or the php.ini configuration version, depending on what your hosting environment requires (you may have to contact your administrator to find this out.)  Remember to append this info to any existing info, if there is already an existing file.</p>
<form action="setup.php">
<div>
<label for="htaccess">.htaccess version</label>
<textarea name="htaccess" id="htaccess" cols="60" rows="4"><?php
$revised_include_path = ini_get('include_path').':'.dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'nephtali';

$content = <<<EOD

# Make sure you have the editor set up for linux (LF) and not Mac (CR)
# Use php_value for string edits and php_flag for on/off

# Watch out!  Some servers require that you nest the configuration info below
# between <IfModule php5_module> tags, such as:
# <IfModule php5_module>
# php_value include_path ".:/usr/local/lib/php:/home/example/path/to/nephtali"
# Other PHP settings...
# <IfModule>

# Add nephtali to the current include path
# You can view the current path by viewing the phpinfo info
# In general, the format should be as below:
# php_value include_path "CURRENT_INCLUDE_PATH:PATH_TO_NEPHTALI"
php_value include_path "$revised_include_path"

# Set auto_append_file to nephtali/ncore.php
php_value auto_append_file "ncore.php"

# Start output buffering, a requirement for Nephtali
php_flag output_buffering on

# Set display_errors to off
# Can turn on to troubleshoot but don't forget to turn back off
php_flag display_errors off

# Set magic_quotes_gpc to off for security reasons
# https://www2.sans.org/top20/#s1
php_flag magic_quotes_gpc off
php_flag register_globals off

# Only allow cookie-based sessions to avoid session hijacking
# from referrer info
php_flag session.use_only_cookies on

# Set short_open_tag to off so it doesn't interfere with
# xml declarations
php_flag short_open_tag off

EOD;
echo $content;
?></textarea>
<label for="phpini">php.ini version</label>
<textarea name="phpini" id="phpini" rows="4" cols="60"><?php

$revised_include_path = ini_get('include_path').':'.dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'nephtali';

$content = <<<EOD

; Make sure you have the editor set up for linux (LF) and not Mac (CR)
; Use the format below for configuring php settings
; setting_name = setting_value (use 'On' or 'Off' for booleans)

; Add nephtali to the current include path
; You can view the current path by viewing the phpinfo info
; In general, the format should be as below:
; include_path "CURRENT_INCLUDE_PATH:PATH_TO_NEPHTALI"
include_path = "$revised_include_path"

; Set auto_append_file to nephtali/core.php
auto_append_file = "ncore.php"

; Start output buffering, a requirement for Nephtali
output_buffering = On

; Set display_errors to off
; Can turn on long enough to troubleshoot but don't forget to turn back off
display_errors = Off

; Set magic_quotes_gpc to off for security reasons
; https://www2.sans.org/top20/#s1
magic_quotes_gpc = Off
register_globals = Off

; Only allow cookie-based sessions to avoid session hijacking
; from referrer info
session.use_only_cookies = On

; Set short_open_tag to off so it doesn't interfere with
; xml declarations
short_open_tag = Off

EOD;

echo $content;
?></textarea>
</div>
</form>
</li>
<li>
<h2>Test Nephtali</h2>
<p>Try refreshing this page.  If Nephtali is working, you should see new content telling it's working and how to finish.</p>
<p><strong>If you see this same page content</strong>, Nephtali isn't working.  Please review the steps above and make sure you didn't make a mistake.</p>
<p>Feel free to <a href="http://nephtaliproject.com/contact">contact the developers</a> if you believe there are issues you can't resolve.</p>
</li>
</ol>
<?php
	}
?>
</div>
</div>
</div>
</body>
</html>